﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Interfleet.SE.UICompiler.Core
{
    /// <summary>
    /// Compile types that supports compilation from and to a <see cref="System.IO.Stream"/>
    /// </summary>
    public class StreamCompileType : CompileTypeBase
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="supplier"><see cref="CompileSupplier"/> of this compile type</param>
        /// <param name="entityType"><see cref="CompileEntityType"/> of this compile type</param>
        /// <param name="requiresCompileOption">True if compileoption is required</param>
        public StreamCompileType(CompileSupplier supplier, CompileEntityType entityType, bool requiresCompileOption)
            : base(supplier, entityType, requiresCompileOption)
        {

        }

        /// <summary>
        /// Compilation of css will be done via Yahoo UI Compressor
        /// </summary>
        public static StreamCompileType YUICompressorCss
        {
            get
            {
                return new StreamCompileType(CompileSupplier.YUICompressorCss, CompileEntityType.Css, false);
            }
        }

        /// <summary>
        /// Compilation of javascript will be done via Yahoo UI Compressor
        /// </summary>
        public static StreamCompileType YUICompressorJavaScript
        {
            get
            {
                return new StreamCompileType(CompileSupplier.YUICompressorJavaScript, CompileEntityType.JavaScript, false);
            }
        }
    }
}
